<template>
	<view class="container">
		<view class="content">
			<text class="cont">{{shop_text}}</text>
			<button class="shop_bt" @click="shop()">{{btn_text}}</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				is_login:false,
				shop_text:'亲，您还没有登录哦',
				btn_text:'去登录',
			}
		},
		
		onLoad(){
			if(this.is_login){
				this.shop_text = '亲，购物车还没有商品哦';
				this.btn_text='去购物';
			}
			else{
				this.shop_text='亲，您还没有登录哦';
				this.btn_text='去登录';
			}
		},
		
		methods: {
			shop(){
				if(this.is_login){
					uni.showToast({
						title:'购物'
					})
				}
				else{
					uni.showToast({
						title:'登录'
					})
				}

			},
		}
	}
</script>

<style lang="scss">
.container{
	background-color: #F7F7F7;
	height: 100vh;
	
	.content{
		padding: 250rpx 100rpx;
		box-sizing: border-box;
		.cont{
			display: block;
			text-align: center;
			font-size: 30rpx;
			color: #999999;
		}
		
		.shop_bt{
			margin-top: 25rpx;
			text-align: center;
			width: 200rpx;
			height: 80rpx;
			font-size: 30rpx;
			color: #999999;
		}
	}
}
</style>
